package com.allwees.bs.c.module.order.req;

import com.allwees.bs.core.modelbase.req.Req;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * 购物车
 */
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
public class CartCheckoutReq extends Req {

    public CartCheckoutReq(Integer calculateType, String cartUuid) {
        this.calculateType = calculateType;
        this.cartUuid = cartUuid;
    }

    // 购物车id
    private String cartUuid;

    // 用户优惠券
    private String userCouponUuid;

    // UserCouponModel的no OR UserModel的promoCode
    private String promoCode;

    // 是否计算优惠券等 0 不计算 1 计算
    private Integer calculateType = 1;

    // 是否购买运费险
    private boolean buyShippingInsurance = false;

    public boolean nonCalculateOther(){
        return 0 == calculateType;
    }
}
